package com.mobiporter.adias.tags.utils;
import java.util.ArrayList;
import java.util.List;

import com.mobiporter.adias.tags.model.SelectItem;


public class CollectionsUtils 
{
	public static List<SelectItem> getHashMapFromLists(java.util.List<String> keys, java.util.List<String> values)
	{
		if (keys==null || values==null)
		{
			return null ;
		}
		if (keys.size() != values.size())
		{
			throw new IllegalArgumentException() ;
		}
		else
		{
			List<SelectItem> map = new ArrayList<SelectItem>() ;
			for (int i=0 ; i< keys.size() ; i++)
			{
				SelectItem m = new SelectItem() ;
				m.setKey(keys.get(i));
				m.setValue(values.get(i));
				map.add(m);
			}
			return map ;
		}
	}
}
